
window.onload = function(){
    var nav = document.querySelector(".nav");
    var nav2 = document.querySelector(".nav2");
    window.onscroll = function(){
        let offsetY = zzgetPageScroll().y;
        console.log(offsetY);
        if (offsetY >= nav.offsetHeight) {
            nav2.style.top = "0";
        }else{
            nav2.style.top = "-100px";
        }
    };
};